<?php

class User {
    
    private $bd =  array(array("name" => "jean","password"=>"12345"),array("name"=>"ricardo","password"=>"54321"));
       
   
    public function getUser($username,$password){
        
        foreach($this->bd as $user){
            if($user['name'] == $username && $user['password'] == $password){
                return true;
            }
        }
        return false;
    }
    
    public function addUser($username,$password){
        //aqui cadastraria no bd;
    }
}

    

?>
